-- damage
-- create by panyl
-- 伤害减少

return {
    apply = function(prop, baseValue)
        -- 比率减少
        local v = prop[3];
        local reduce = math.modf(baseValue * v / 1000);

        -- 返回减少的值，不能高于伤害
        return math.min(reduce, baseValue);
    end,

    title = function(prop)
        local row = PropM.getRow(prop[1]);

        if ActivityDungeonM.isInActivityDungeon() then
            -- 庇护光环技能名称
            return SkillM.query(2210, "name");
        end

        return row.alias;
    end,

    record = function(target, prop, path)
        return false;
    end
};
